﻿namespace caedisi
{
    using System.Windows.Controls;
    using System.Windows.Navigation;
    using caedisi.Views;

    /// <summary>
    /// <see cref="Page"/> class to present information Library the current application.
    /// </summary>
    public partial class Library : Page
    {
        /// <summary>
        /// Creates a new instance of the <see cref="Library"/> class.
        /// </summary>
        public Library()
        {
            InitializeComponent();

            this.Title = ApplicationStrings.LibraryPageTitle;
        }

        /// <summary>
        /// Executes when the user navigates to this page.
        /// </summary>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }

        private void mainMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ListBox mainMenu = sender as ListBox;

            if (mainMenu.SelectedItem == menuNeighbourhood)
            {
                this.RightContentWindow.Content = new NeighbourhoodDefinition();
            }
            else if (mainMenu.SelectedItem == menuTransitionState)
            {
                this.RightContentWindow.Content = new TransitionStateDefinition();
            }
            
        }
        
    }
}